package com.lanchetech.common.enums;

import lombok.Getter;

@Getter
public enum FarmTaskKindEnum {
    INVITE(1L, "邀请好友"),
    ALL_FREE_SPU(2L, "购买任意免单商品"),
    TARGET_FREE_SPU(3L, "购买指定免单商品"),
    ALL_SHOP_SPU(4L, "购买任意商家商品"),
    TARGET_SHOP_SPU(5L, "购买指定商家商品"),
    SIGN_IN(6L,"签到"),
    SIGN_IN_CUMULATIVE(7L,"累计签到"),
    VIEW_URL(8L,"浏览指定页面"),
    POSTER(9L,"分享推广海报"),
    ;

    private Long kind;
    private String remark;

    FarmTaskKindEnum(Long kind, String remark) {
        this.kind = kind;
        this.remark = remark;
    }

    public static FarmTaskKindEnum getByKind(Long kind) {
        for (FarmTaskKindEnum item : FarmTaskKindEnum.values()) {
            if (item.getKind().equals(kind)) {
                return item;
            }
        }
        return null;
    }
}
